﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Teacher/Teacher.master" AutoEventWireup="true" CodeFile="ManageExhibition.aspx.cs" Inherits="Teacher_ManageExhibition" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <dx:ASPxGridView ID="gvwExhibition" runat="server" AutoGenerateColumns="False" 
        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
        DataSourceID="SqlDataSource1" KeyFieldName="ExhibitionID" 
        onrowvalidating="gvwExhibition_RowValidating" 
        Caption="Exhibition Manahement" Width="100%">
        <Columns>
            <dx:GridViewCommandColumn VisibleIndex="0">
                <EditButton Visible="True">
                </EditButton>
                <NewButton Visible="True">
                </NewButton>
                <DeleteButton Visible="True">
                </DeleteButton>
                <UpdateButton Text="Save">
                </UpdateButton>
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn FieldName="ExhibitionID" ReadOnly="True" 
                VisibleIndex="1">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Exhibition_Details" VisibleIndex="2">
            </dx:GridViewDataTextColumn>
        </Columns>
        <Settings ShowFilterRow="True" />
        <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Institte_of_Fine_ArtsConnectionString %>" 
        DeleteCommand="DELETE FROM [Exhibition_Details] WHERE [ExhibitionID] = @ExhibitionID
 DELETE FROM [Exhibition] WHERE [ExhibitionID] = @ExhibitionID" 
        InsertCommand="INSERT INTO [Exhibition] ([Exhibition_Details]) VALUES (@Exhibition_Details)" 
        SelectCommand="SELECT * FROM [Exhibition]" 
        
        
        
        
        UpdateCommand="UPDATE [Exhibition] SET [Exhibition_Details] = @Exhibition_Details WHERE [ExhibitionID] = @ExhibitionID">
        <DeleteParameters>
            <asp:Parameter Name="ExhibitionID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Exhibition_Details" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Exhibition_Details" Type="String" />
            <asp:Parameter Name="ExhibitionID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>

